1. Field of the Invention
The present invention relates, in general, to the transfer of buffered data between a host and a data storage device. Specifically, the invention relates to methods and systems of extent-based cache memory management for the allocation of space in a data buffer.
2. Relevant Background
Data buffers may be used in data storage devices to facilitate the transfer of data between a host (e.g., a computer) and the storage device (e.g., a disk drive). The buffers, commonly constructed of Dynamic Random Access Memory (DRAM), provide a temporary data storage location to buffer data transfers between the host and the storage device.
The data space in a data buffer may be divided into one or more data segments. Segmented data buffers are well-suited as a data speed-matching device to buffer data between a host and a disk drive. However, when attempting to implement advanced cache and disk algorithms that improve data access performance, buffer segments have limitations.
One limitation is that buffer segments of fixed size often have a portion of their space go unused. This space, which cannot be allocated for other data uses, adversely impacts the storage density of the data buffer. Another limitation is that it is only possible to track a single sequence of LBAs in a segmented buffer with conventional methods of defining a Start LBA and using block counters to determine the length of the LBA chain. This too limits the storage density of a buffer because LBA chains must be stored in sequential segments in the buffer.
Still another limitation with conventional segmented buffers arises because data segments are not transferred out of sequential order to and from the buffer. This is not as much of a limitation for transfers from the host to the data buffer because host data is almost always stored in chains of sequential LBAs. However, transfers of sequential data segments between the buffer and a hard disk are often much less efficient because sequential LBA data may be stored on different tracks of the disk. These and other limitations of the conventional segmented data buffers are addressed by the present invention.